home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.4 KB | 111 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Frame.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FRAME_H
- #define FRAME_H
-
- #ifndef FWFRAME_H
- #include "FWFrame.h"
- #endif
-
- #ifndef FWSTRING_H
- #include "FWString.h"
- #endif
-
- #ifndef FWCOLOR_H
- #include "FWColor.h"
- #endif
-
- #ifndef FWRECT_H
- #include "FWRect.h"
- #endif
-
- #ifndef FWMAPING_H
- #include "FWMaping.h"
- #endif
-
- //========================================================================================
- // Classes used by this interface
- //========================================================================================
-
- class FW_CTime;
- class CClockPart;
- class CClockContent;
- class FW_CGraphicContext;
- class CClockView;
-
- //========================================================================================
- // Defines
- //========================================================================================
-
- #define kBackgroundColorProp "Apple:Framework:Property:BackgroundColor"
- #define kBackgroundColorValue "Apple:Framework:Value:BackgroundColor"
-
- //========================================================================================
- // CClockFrame
- //========================================================================================
-
- class CClockFrame : public FW_CFrame
- {
- public:
- FW_DECLARE_AUTO(CClockFrame)
-
- //----------------------------------------------------------------------------------------
- // Constructor/Destructor
- //
- public:
- CClockFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, CClockPart* clockPart, CClockContent* content);
- virtual ~ CClockFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
- virtual void FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
-
- virtual ODShape* AdjustUsedShape(Environment* ev, ODShape* suggestedUsedShape);
- virtual ODShape* AdjustActiveShape(Environment* ev, ODFacet* facet, ODShape* suggestedActiveShape);
-
- virtual void PresentationChanged(Environment* ev);
-
- virtual FW_Handled DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
- virtual FW_Handled DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- CClockView* GetClockView(Environment* ev) const;
- CClockContent* GetClockContent(Environment* ev) const;
-
- void SetBackgroundColor(Environment* ev, FW_CColor& newColor);
- void GetBackgroundColor(FW_CColor* newColor) const;
- private:
- virtual void AdoptContainingPartProperties(Environment* ev, ODStorageUnit* propertyUnit);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CClockPart* fClockPart;
- FW_CColor fBackgroundColor;
- CClockContent* fClockContent;
- };
-
- //----------------------------------------------------------------------------------------
- // CClockFrame::GetClockContent
- //----------------------------------------------------------------------------------------
- inline CClockContent* CClockFrame::GetClockContent(Environment*) const
- {
- return fClockContent;
- }
-
- #endif
-